const data = [
    { type: '问天实验舱', value: '5', formula: 'WengT', texture: 'rect' },
    { type: '梦天实验舱', value: '2.83', formula: 'MengT', texture: 'bias-rl' },
    { type: '天和核心舱', value: '3.63', formula: 'TianH', texture: 'grid' },
    { type: '神舟飞船', value: '46.60', formula: 'ShenZ', texture: 'circle' },
    { type: '天舟飞船', value: '27.72', formula: 'TianZ', texture: 'horizontal-line' },
];
export default {
    type: 'pie',
    data: [
        {
            id: 'id0',
            values: data
        }
    ],
    outerRadius: 0.8,
    innerRadius: 0.5,
    padAngle: 0.6,
    valueField: 'value',
    categoryField: 'type',
    pie: {
        style: {
            cornerRadius: 10,
        },
        state: {
            hover: {
                outerRadius: 0.85,
                stroke: '#000',
                lineWidth: 1
            },
            selected: {
                outerRadius: 0.85,
                stroke: '#000',
                lineWidth: 1
            }
        }
    },
    tooltip: {
        style: {
            panel: {
                shadow: {
                    blur: 20,
                    offsetX: 4,
                    color: '#ff9b9b9b'
                }
            }
        },
        mark: {
            content: [
                {
                    key: datum => datum['type'],
                    value: datum => datum['value'] + '%'
                }
            ]
        }
    },
    title: {
        visible: true,
        text: '水质总览'
    },
    indicator: {
        visible: true,
        trigger: 'hover',
        limitRatio: 0.4,
        title: {
            visible: true,
            autoFit: true,
            field: 'formula',
            style: {
                fontWeight: 'bolder',
                fontFamily: 'Times New Roman',
                fill: '#888',
            }
        },
        content: [
            {
                visible: true,
                field: 'type',
                style: {
                    fontSize: 20,
                    fill: 'orange',
                    fontWeight: 'bolder',
                    fontFamily: 'Times New Roman',
                }
            },
            {
                visible: true,
                field: 'value',
                style: {
                    fontSize: 18,
                    fill: 'orange',
                    fontFamily: 'Times New Roman',
                }
            }
        ]
    },
    legends: {
        visible: true,
        orient: 'left',
        item: {
            shape: {
                style: {
                    symbolType: 'circle',
                    texture: datum => datum['texture']
                }
            }
        }
    }
};
